﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="PurchaseHistory.aspx.cs" Inherits="gamexpert.member.PurchaseHistory" Theme="Black" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2>Purchase History</h2>
<asp:MultiView ID="MultiView1" runat="server">
    <asp:View ID="View1" runat="server">
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" BackColor="White" BorderColor="#DEDFDE" 
            BorderStyle="None" BorderWidth="1px" CellPadding="4" CssClass="purchasehistory" 
            DataKeyNames="id" ForeColor="Black" GridLines="Vertical" 
            onselectedindexchanged="GridView1_SelectedIndexChanged">
            <RowStyle BackColor="#F7F7DE" />
            <Columns>
                <asp:TemplateField ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Select" Text="View Details"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="id" HeaderText="Order ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="id" />
                <asp:BoundField DataField="orderdate" HeaderText="Date" 
                    SortExpression="orderdate" />
                <asp:BoundField DataField="bfirstname" HeaderText="First Name[Billing]" 
                    SortExpression="bfirstname" />
                <asp:BoundField DataField="blastname" HeaderText="Last Name[Billing]" 
                    SortExpression="blastname" />
                <asp:BoundField DataField="bemail" HeaderText="Email[Billing]" 
                    SortExpression="bemail" />
                <asp:BoundField DataField="bphone" HeaderText="Phone[Email]" 
                    SortExpression="bphone" />
                <asp:BoundField DataField="tax" HeaderText="Tax(%)" SortExpression="tax" />
                <asp:TemplateField HeaderText="Total(S$)" SortExpression="total">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("total") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("total", "{0:N}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCC99" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <EmptyDataTemplate>
                No purchase record history found.
            </EmptyDataTemplate>
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConflictDetection="CompareAllValues" 
            ConnectionString="<%$ ConnectionStrings:gamexpertConnectionString %>" 
            DeleteCommand="DELETE FROM [my_order] WHERE [id] = @original_id AND [userid] = @original_userid AND (([sfirstname] = @original_sfirstname) OR ([sfirstname] IS NULL AND @original_sfirstname IS NULL)) AND (([slastname] = @original_slastname) OR ([slastname] IS NULL AND @original_slastname IS NULL)) AND (([semail] = @original_semail) OR ([semail] IS NULL AND @original_semail IS NULL)) AND (([saddress] = @original_saddress) OR ([saddress] IS NULL AND @original_saddress IS NULL)) AND (([scity] = @original_scity) OR ([scity] IS NULL AND @original_scity IS NULL)) AND (([sstate] = @original_sstate) OR ([sstate] IS NULL AND @original_sstate IS NULL)) AND (([scountry] = @original_scountry) OR ([scountry] IS NULL AND @original_scountry IS NULL)) AND (([szip] = @original_szip) OR ([szip] IS NULL AND @original_szip IS NULL)) AND (([sphone] = @original_sphone) OR ([sphone] IS NULL AND @original_sphone IS NULL)) AND (([bfirstname] = @original_bfirstname) OR ([bfirstname] IS NULL AND @original_bfirstname IS NULL)) AND (([blastname] = @original_blastname) OR ([blastname] IS NULL AND @original_blastname IS NULL)) AND (([bemail] = @original_bemail) OR ([bemail] IS NULL AND @original_bemail IS NULL)) AND (([baddress] = @original_baddress) OR ([baddress] IS NULL AND @original_baddress IS NULL)) AND (([bcity] = @original_bcity) OR ([bcity] IS NULL AND @original_bcity IS NULL)) AND (([bstate] = @original_bstate) OR ([bstate] IS NULL AND @original_bstate IS NULL)) AND (([bcountry] = @original_bcountry) OR ([bcountry] IS NULL AND @original_bcountry IS NULL)) AND (([bzip] = @original_bzip) OR ([bzip] IS NULL AND @original_bzip IS NULL)) AND (([bphone] = @original_bphone) OR ([bphone] IS NULL AND @original_bphone IS NULL)) AND (([tax] = @original_tax) OR ([tax] IS NULL AND @original_tax IS NULL)) AND (([total] = @original_total) OR ([total] IS NULL AND @original_total IS NULL))" 
            InsertCommand="INSERT INTO [my_order] ([userid], [sfirstname], [slastname], [semail], [saddress], [scity], [sstate], [scountry], [szip], [sphone], [bfirstname], [blastname], [bemail], [baddress], [bcity], [bstate], [bcountry], [bzip], [bphone], [tax], [total]) VALUES (@userid, @sfirstname, @slastname, @semail, @saddress, @scity, @sstate, @scountry, @szip, @sphone, @bfirstname, @blastname, @bemail, @baddress, @bcity, @bstate, @bcountry, @bzip, @bphone, @tax, @total)" 
            OldValuesParameterFormatString="original_{0}" 
            SelectCommand="SELECT id, userid, sfirstname, slastname, semail, saddress, scity, sstate, scountry, szip, sphone, bfirstname, blastname, bemail, baddress, bcity, bstate, bcountry, bzip, bphone, tax, total, orderdate FROM my_order WHERE (userid = @userid)" 
            
            UpdateCommand="UPDATE [my_order] SET [userid] = @userid, [sfirstname] = @sfirstname, [slastname] = @slastname, [semail] = @semail, [saddress] = @saddress, [scity] = @scity, [sstate] = @sstate, [scountry] = @scountry, [szip] = @szip, [sphone] = @sphone, [bfirstname] = @bfirstname, [blastname] = @blastname, [bemail] = @bemail, [baddress] = @baddress, [bcity] = @bcity, [bstate] = @bstate, [bcountry] = @bcountry, [bzip] = @bzip, [bphone] = @bphone, [tax] = @tax, [total] = @total WHERE [id] = @original_id AND [userid] = @original_userid AND (([sfirstname] = @original_sfirstname) OR ([sfirstname] IS NULL AND @original_sfirstname IS NULL)) AND (([slastname] = @original_slastname) OR ([slastname] IS NULL AND @original_slastname IS NULL)) AND (([semail] = @original_semail) OR ([semail] IS NULL AND @original_semail IS NULL)) AND (([saddress] = @original_saddress) OR ([saddress] IS NULL AND @original_saddress IS NULL)) AND (([scity] = @original_scity) OR ([scity] IS NULL AND @original_scity IS NULL)) AND (([sstate] = @original_sstate) OR ([sstate] IS NULL AND @original_sstate IS NULL)) AND (([scountry] = @original_scountry) OR ([scountry] IS NULL AND @original_scountry IS NULL)) AND (([szip] = @original_szip) OR ([szip] IS NULL AND @original_szip IS NULL)) AND (([sphone] = @original_sphone) OR ([sphone] IS NULL AND @original_sphone IS NULL)) AND (([bfirstname] = @original_bfirstname) OR ([bfirstname] IS NULL AND @original_bfirstname IS NULL)) AND (([blastname] = @original_blastname) OR ([blastname] IS NULL AND @original_blastname IS NULL)) AND (([bemail] = @original_bemail) OR ([bemail] IS NULL AND @original_bemail IS NULL)) AND (([baddress] = @original_baddress) OR ([baddress] IS NULL AND @original_baddress IS NULL)) AND (([bcity] = @original_bcity) OR ([bcity] IS NULL AND @original_bcity IS NULL)) AND (([bstate] = @original_bstate) OR ([bstate] IS NULL AND @original_bstate IS NULL)) AND (([bcountry] = @original_bcountry) OR ([bcountry] IS NULL AND @original_bcountry IS NULL)) AND (([bzip] = @original_bzip) OR ([bzip] IS NULL AND @original_bzip IS NULL)) AND (([bphone] = @original_bphone) OR ([bphone] IS NULL AND @original_bphone IS NULL)) AND (([tax] = @original_tax) OR ([tax] IS NULL AND @original_tax IS NULL)) AND (([total] = @original_total) OR ([total] IS NULL AND @original_total IS NULL))">
            <SelectParameters>
                <asp:SessionParameter Name="userid" SessionField="userid" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="original_id" Type="Int32" />
                <asp:Parameter Name="original_userid" Type="Object" />
                <asp:Parameter Name="original_sfirstname" Type="String" />
                <asp:Parameter Name="original_slastname" Type="String" />
                <asp:Parameter Name="original_semail" Type="String" />
                <asp:Parameter Name="original_saddress" Type="String" />
                <asp:Parameter Name="original_scity" Type="String" />
                <asp:Parameter Name="original_sstate" Type="String" />
                <asp:Parameter Name="original_scountry" Type="String" />
                <asp:Parameter Name="original_szip" Type="String" />
                <asp:Parameter Name="original_sphone" Type="String" />
                <asp:Parameter Name="original_bfirstname" Type="String" />
                <asp:Parameter Name="original_blastname" Type="String" />
                <asp:Parameter Name="original_bemail" Type="String" />
                <asp:Parameter Name="original_baddress" Type="String" />
                <asp:Parameter Name="original_bcity" Type="String" />
                <asp:Parameter Name="original_bstate" Type="String" />
                <asp:Parameter Name="original_bcountry" Type="String" />
                <asp:Parameter Name="original_bzip" Type="String" />
                <asp:Parameter Name="original_bphone" Type="String" />
                <asp:Parameter Name="original_tax" Type="Single" />
                <asp:Parameter Name="original_total" Type="Decimal" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="userid" Type="Object" />
                <asp:Parameter Name="sfirstname" Type="String" />
                <asp:Parameter Name="slastname" Type="String" />
                <asp:Parameter Name="semail" Type="String" />
                <asp:Parameter Name="saddress" Type="String" />
                <asp:Parameter Name="scity" Type="String" />
                <asp:Parameter Name="sstate" Type="String" />
                <asp:Parameter Name="scountry" Type="String" />
                <asp:Parameter Name="szip" Type="String" />
                <asp:Parameter Name="sphone" Type="String" />
                <asp:Parameter Name="bfirstname" Type="String" />
                <asp:Parameter Name="blastname" Type="String" />
                <asp:Parameter Name="bemail" Type="String" />
                <asp:Parameter Name="baddress" Type="String" />
                <asp:Parameter Name="bcity" Type="String" />
                <asp:Parameter Name="bstate" Type="String" />
                <asp:Parameter Name="bcountry" Type="String" />
                <asp:Parameter Name="bzip" Type="String" />
                <asp:Parameter Name="bphone" Type="String" />
                <asp:Parameter Name="tax" Type="Single" />
                <asp:Parameter Name="total" Type="Decimal" />
                <asp:Parameter Name="original_id" Type="Int32" />
                <asp:Parameter Name="original_userid" Type="Object" />
                <asp:Parameter Name="original_sfirstname" Type="String" />
                <asp:Parameter Name="original_slastname" Type="String" />
                <asp:Parameter Name="original_semail" Type="String" />
                <asp:Parameter Name="original_saddress" Type="String" />
                <asp:Parameter Name="original_scity" Type="String" />
                <asp:Parameter Name="original_sstate" Type="String" />
                <asp:Parameter Name="original_scountry" Type="String" />
                <asp:Parameter Name="original_szip" Type="String" />
                <asp:Parameter Name="original_sphone" Type="String" />
                <asp:Parameter Name="original_bfirstname" Type="String" />
                <asp:Parameter Name="original_blastname" Type="String" />
                <asp:Parameter Name="original_bemail" Type="String" />
                <asp:Parameter Name="original_baddress" Type="String" />
                <asp:Parameter Name="original_bcity" Type="String" />
                <asp:Parameter Name="original_bstate" Type="String" />
                <asp:Parameter Name="original_bcountry" Type="String" />
                <asp:Parameter Name="original_bzip" Type="String" />
                <asp:Parameter Name="original_bphone" Type="String" />
                <asp:Parameter Name="original_tax" Type="Single" />
                <asp:Parameter Name="original_total" Type="Decimal" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="userid" Type="Object" />
                <asp:Parameter Name="sfirstname" Type="String" />
                <asp:Parameter Name="slastname" Type="String" />
                <asp:Parameter Name="semail" Type="String" />
                <asp:Parameter Name="saddress" Type="String" />
                <asp:Parameter Name="scity" Type="String" />
                <asp:Parameter Name="sstate" Type="String" />
                <asp:Parameter Name="scountry" Type="String" />
                <asp:Parameter Name="szip" Type="String" />
                <asp:Parameter Name="sphone" Type="String" />
                <asp:Parameter Name="bfirstname" Type="String" />
                <asp:Parameter Name="blastname" Type="String" />
                <asp:Parameter Name="bemail" Type="String" />
                <asp:Parameter Name="baddress" Type="String" />
                <asp:Parameter Name="bcity" Type="String" />
                <asp:Parameter Name="bstate" Type="String" />
                <asp:Parameter Name="bcountry" Type="String" />
                <asp:Parameter Name="bzip" Type="String" />
                <asp:Parameter Name="bphone" Type="String" />
                <asp:Parameter Name="tax" Type="Single" />
                <asp:Parameter Name="total" Type="Decimal" />
            </InsertParameters>
        </asp:SqlDataSource>
         <div>
            <asp:LinkButton ID="LinkButton4" runat="server"  CssClass="rightback" 
                 onclick="LinkButton4_Click">Back to My Account</asp:LinkButton>
        </div>
    </asp:View>
    <asp:View ID="View2" runat="server">
        <asp:FormView ID="FormView1" runat="server" 
            CssClass="orderformview" DataKeyNames="id" DataSourceID="SqlDataSource3">
            <EditItemTemplate>
                id:
                <asp:Label ID="idLabel1" runat="server" Text='<%# Eval("id") %>' />
                <br />
                userid:
                <asp:TextBox ID="useridTextBox" runat="server" Text='<%# Bind("userid") %>' />
                <br />
                sfirstname:
                <asp:TextBox ID="sfirstnameTextBox" runat="server" 
                    Text='<%# Bind("sfirstname") %>' />
                <br />
                slastname:
                <asp:TextBox ID="slastnameTextBox" runat="server" 
                    Text='<%# Bind("slastname") %>' />
                <br />
                semail:
                <asp:TextBox ID="semailTextBox" runat="server" Text='<%# Bind("semail") %>' />
                <br />
                saddress:
                <asp:TextBox ID="saddressTextBox" runat="server" 
                    Text='<%# Bind("saddress") %>' />
                <br />
                scity:
                <asp:TextBox ID="scityTextBox" runat="server" Text='<%# Bind("scity") %>' />
                <br />
                sstate:
                <asp:TextBox ID="sstateTextBox" runat="server" Text='<%# Bind("sstate") %>' />
                <br />
                scountry:
                <asp:TextBox ID="scountryTextBox" runat="server" 
                    Text='<%# Bind("scountry") %>' />
                <br />
                szip:
                <asp:TextBox ID="szipTextBox" runat="server" Text='<%# Bind("szip") %>' />
                <br />
                sphone:
                <asp:TextBox ID="sphoneTextBox" runat="server" Text='<%# Bind("sphone") %>' />
                <br />
                bfirstname:
                <asp:TextBox ID="bfirstnameTextBox" runat="server" 
                    Text='<%# Bind("bfirstname") %>' />
                <br />
                blastname:
                <asp:TextBox ID="blastnameTextBox" runat="server" 
                    Text='<%# Bind("blastname") %>' />
                <br />
                bemail:
                <asp:TextBox ID="bemailTextBox" runat="server" Text='<%# Bind("bemail") %>' />
                <br />
                baddress:
                <asp:TextBox ID="baddressTextBox" runat="server" 
                    Text='<%# Bind("baddress") %>' />
                <br />
                bcity:
                <asp:TextBox ID="bcityTextBox" runat="server" Text='<%# Bind("bcity") %>' />
                <br />
                bstate:
                <asp:TextBox ID="bstateTextBox" runat="server" Text='<%# Bind("bstate") %>' />
                <br />
                bcountry:
                <asp:TextBox ID="bcountryTextBox" runat="server" 
                    Text='<%# Bind("bcountry") %>' />
                <br />
                bzip:
                <asp:TextBox ID="bzipTextBox" runat="server" Text='<%# Bind("bzip") %>' />
                <br />
                bphone:
                <asp:TextBox ID="bphoneTextBox" runat="server" Text='<%# Bind("bphone") %>' />
                <br />
                tax:
                <asp:TextBox ID="taxTextBox" runat="server" Text='<%# Bind("tax") %>' />
                <br />
                total:
                <asp:TextBox ID="totalTextBox" runat="server" Text='<%# Bind("total") %>' />
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="Update" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </EditItemTemplate>
            <InsertItemTemplate>
                userid:
                <asp:TextBox ID="useridTextBox" runat="server" Text='<%# Bind("userid") %>' />
                <br />
                sfirstname:
                <asp:TextBox ID="sfirstnameTextBox" runat="server" 
                    Text='<%# Bind("sfirstname") %>' />
                <br />
                slastname:
                <asp:TextBox ID="slastnameTextBox" runat="server" 
                    Text='<%# Bind("slastname") %>' />
                <br />
                semail:
                <asp:TextBox ID="semailTextBox" runat="server" Text='<%# Bind("semail") %>' />
                <br />
                saddress:
                <asp:TextBox ID="saddressTextBox" runat="server" 
                    Text='<%# Bind("saddress") %>' />
                <br />
                scity:
                <asp:TextBox ID="scityTextBox" runat="server" Text='<%# Bind("scity") %>' />
                <br />
                sstate:
                <asp:TextBox ID="sstateTextBox" runat="server" Text='<%# Bind("sstate") %>' />
                <br />
                scountry:
                <asp:TextBox ID="scountryTextBox" runat="server" 
                    Text='<%# Bind("scountry") %>' />
                <br />
                szip:
                <asp:TextBox ID="szipTextBox" runat="server" Text='<%# Bind("szip") %>' />
                <br />
                sphone:
                <asp:TextBox ID="sphoneTextBox" runat="server" Text='<%# Bind("sphone") %>' />
                <br />
                bfirstname:
                <asp:TextBox ID="bfirstnameTextBox" runat="server" 
                    Text='<%# Bind("bfirstname") %>' />
                <br />
                blastname:
                <asp:TextBox ID="blastnameTextBox" runat="server" 
                    Text='<%# Bind("blastname") %>' />
                <br />
                bemail:
                <asp:TextBox ID="bemailTextBox" runat="server" Text='<%# Bind("bemail") %>' />
                <br />
                baddress:
                <asp:TextBox ID="baddressTextBox" runat="server" 
                    Text='<%# Bind("baddress") %>' />
                <br />
                bcity:
                <asp:TextBox ID="bcityTextBox" runat="server" Text='<%# Bind("bcity") %>' />
                <br />
                bstate:
                <asp:TextBox ID="bstateTextBox" runat="server" Text='<%# Bind("bstate") %>' />
                <br />
                bcountry:
                <asp:TextBox ID="bcountryTextBox" runat="server" 
                    Text='<%# Bind("bcountry") %>' />
                <br />
                bzip:
                <asp:TextBox ID="bzipTextBox" runat="server" Text='<%# Bind("bzip") %>' />
                <br />
                bphone:
                <asp:TextBox ID="bphoneTextBox" runat="server" Text='<%# Bind("bphone") %>' />
                <br />
                tax:
                <asp:TextBox ID="taxTextBox" runat="server" Text='<%# Bind("tax") %>' />
                <br />
                total:
                <asp:TextBox ID="totalTextBox" runat="server" Text='<%# Bind("total") %>' />
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Insert" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
            <ItemTemplate>
                
                <ul>
                    <li>
                        Order ID:
                        <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                    </li>
                    <!--
                    <li>
                        User ID:
                        <asp:Label ID="useridLabel" runat="server" Text='<%# Bind("userid") %>' />
                    </li>
                    -->
                    <!--
                    <li>
                        Tax:
                        <asp:Label ID="taxLabel" runat="server" Text='<%# Bind("tax","{0:N}") %>' />
                    </li>
                    -->
                    <li>
                        Total S$:
                        <asp:Label ID="totalLabel" runat="server" Text='<%# Bind("total","{0:N}") %>' />
                    </li>
                </ul>
                <div>
                    <asp:LinkButton ID="LinkButton3" runat="server" onclick="LinkButton2_Click" CssClass="rightback">Back</asp:LinkButton>
                </div>
                <h4>List of products in this order.</h4>
                
        <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
            CssClass="orderdetail" DataKeyNames="id" DataSourceID="SqlDataSource2" 
            ForeColor="#333333" GridLines="None" onsorted="GridView2_Sorted">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="product_title" HeaderText="Product Title" 
                    SortExpression="product_title" />
                <asp:TemplateField HeaderText="Price[S$]" SortExpression="price">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("price") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("price","{0:N}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Shipping Cost[S$]" SortExpression="shippingcost">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("shippingcost") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" 
                            Text='<%# Bind("shippingcost","{0:N}") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="qty" HeaderText="Qty" SortExpression="qty" />
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        
                <fieldset>
                    <legend>Shipping Information</legend>
                    <table>
                        <tr><td>First Name:</td><td><asp:Label ID="sfirstnameLabel" runat="server"  Text='<%# Bind("sfirstname") %>' /></td></tr>
                        <tr><td>Last Name:</td><td><asp:Label ID="slastnameLabel" runat="server" Text='<%# Bind("slastname") %>' /></td></tr>
                        <tr><td>Email:</td><td><asp:Label ID="semailLabel" runat="server" Text='<%# Bind("semail") %>' /></td></tr>
                        <tr><td>Phone:</td><td><asp:Label ID="sphoneLabel" runat="server" Text='<%# Bind("sphone") %>' /></td></tr>
                        <tr><td>Address:</td><td><asp:Label ID="saddressLabel" runat="server" Text='<%# Bind("saddress") %>' /></td></tr>
                        <tr><td>City:</td><td><asp:Label ID="scityLabel" runat="server" Text='<%# Bind("scity") %>' /></td></tr>
                        <tr><td>State:</td><td><asp:Label ID="sstateLabel" runat="server" Text='<%# Bind("sstate") %>' /></td></tr>
                        <tr><td>Country:</td><td><asp:Label ID="scountryLabel" runat="server" Text='<%# Bind("scountry") %>' /></td></tr>
                        <tr><td>Zip:</td><td><asp:Label ID="szipLabel" runat="server" Text='<%# Bind("szip") %>' /></td></tr>
                    </table>
                </fieldset>
                <fieldset>
                    <legend>Billing Information</legend>
                    <table>
                        <tr><td>First Name:</td><td><asp:Label ID="bfirstnameLabel" runat="server" Text='<%# Bind("bfirstname") %>' /></td></tr>
                        <tr><td>Last Name:</td><td><asp:Label ID="blastnameLabel" runat="server" Text='<%# Bind("blastname") %>' /></td></tr>
                        <tr><td>Email:</td><td><asp:Label ID="bemailLabel" runat="server" Text='<%# Bind("bemail") %>' /></td></tr>
                        <tr><td>Phone:</td><td><asp:Label ID="bphoneLabel" runat="server" Text='<%# Bind("bphone") %>' /></td></tr>
                        <tr><td>Address:</td><td><asp:Label ID="baddressLabel" runat="server" Text='<%# Bind("baddress") %>' /></td></tr>
                        <tr><td>City:</td><td><asp:Label ID="bcityLabel" runat="server" Text='<%# Bind("bcity") %>' /></td></tr>
                        <tr><td>State:</td><td><asp:Label ID="bstateLabel" runat="server" Text='<%# Bind("bstate") %>' /></td></tr>
                        <tr><td>Country:</td><td><asp:Label ID="bcountryLabel" runat="server" Text='<%# Bind("bcountry") %>' /></td></tr>
                        <tr><td>Zip:</td><td><asp:Label ID="bzipLabel" runat="server" Text='<%# Bind("bzip") %>' /></td></tr>
                    </table>
                </fieldset>
            </ItemTemplate>
        </asp:FormView>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:gamexpertConnectionString %>" 
            SelectCommand="SELECT * FROM [my_order] WHERE ([id] = @id)">
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" Name="id" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        
        <div>
            <asp:LinkButton ID="LinkButton2" runat="server" onclick="LinkButton2_Click" CssClass="rightback">Back</asp:LinkButton>
        </div>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:gamexpertConnectionString %>" 
            SelectCommand="SELECT * FROM [my_orderproduct] WHERE ([orderid] = @orderid)">
            <SelectParameters>
                <asp:ControlParameter ControlID="GridView1" Name="orderid" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </asp:View>
</asp:MultiView>
</asp:Content>

